rm(list=ls())
library(foreign)

#delete next line
setwd("C:/Users/Martin Steinwand/Documents/Project Maritime Boundaries/Analysis/R&RJCR/ReplicationPackage")
#uncomment next line, update your path
#setwd(<Your replication directory>)

alldat <- read.dta("Boundary Data_work.8-22-15.dta")
attach(alldat)
alldat$difshare <- -(alldat$difshare-100)/100

workdat <- data.frame(subset(alldat, ongoing2==0& agreement==1& is.na(difshare)==FALSE))
detach(alldat)
attach(workdat)

#histogram of outcome variable
hist(difshare, main="Distribution of Settlement Ratios",
    xlab="Ratio of Reallocated Sea Areas")
